package com.choichumgming.rentcat.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 生成订单时传入的参数
 */
@Data
public class OrderParam {
//    买方Id
@ApiModelProperty(value = "买方")
private Long buyUserId;

    @ApiModelProperty(value = "卖方id")
    private Long sellUserId;

    @ApiModelProperty(value = "卖方username")
    private String sellerUsername;

    @ApiModelProperty(value = "买方userName")
    private String buyerUsername;

    @ApiModelProperty(value = "收货地址id")
    private Long memberReceiveAddressId;

    @ApiModelProperty(value = "支付方式：0->未支付；1->支付宝；2->微信")
    private Integer payType;

    @ApiModelProperty(value = "商品Id")
    private Long productId;

    @ApiModelProperty(value = "运费金额")
    private BigDecimal freightAmount;

    @ApiModelProperty(value = "实付金额")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "租金总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "结束租的时间")
    private Date endTime;

    @ApiModelProperty(value = "订单备注")
    private String note;



    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", buyUserId=").append(buyUserId);
        sb.append(", sellUserId=").append(sellUserId);
        sb.append(", memberReceiveAddressId=").append(memberReceiveAddressId);
        sb.append(", payType=").append(payType);
        sb.append(", productId=").append(productId);
        sb.append(", freightAmount=").append(freightAmount);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", payAmount=").append(payAmount);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", note=").append(note);
        sb.append("]");
        return sb.toString();
    }
}
